<template>
  <div class="adopt-publish">
    <van-nav-bar
      title="fabujiyang"
      left-arrow
      fixed
      @click-left="onClickBack"
      @click-right="onClickPublish"
    >
      <template #right>
        <van-button type="primary" size="small" style="padding: 0 12px"
          >发布</van-button
        >
      </template>
    </van-nav-bar>

    <div class="adopt-publish-textarea">
      <van-cell-group inset>
        <van-field
          v-model="publishInfo"
          autosize
          rows="4"
          type="textarea"
          placeholder="请填写发布信息"
        />
      </van-cell-group>
    </div>

    <div class="adopt-publish-upload">
      <van-uploader v-model="fileList" multiple />
    </div>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from "vue-router";
import { Toast } from "vant";
import { ref } from "vue";
interface fileListInterface {
  [key: string]: string;
}
const router = useRouter();
const publishInfo = ref<string>(
  "是否不是防守反击防晒服女司机方式是麻烦师傅少女风少年模仿少女风是电脑辐射烦恼时发明尼苏达反复少年模仿sniffs发怒什么反复收到你发的是非你莫属方面的少女风少年模仿十多年没发烧烦恼什么的发明尼苏达烦恼什么饭少女风是烦恼什么饭少年模仿少女风是否难受风少年地方是烦恼什么饭少年方式方面难受风少年们地方是你分手反复少年模仿是否难受风女神范少年模仿是你分手烦恼时反复少年风少女风sniffs烦恼什么饭少女风是风少年地方少女风少年地方是的发送到你分手的模仿苏丹诺夫苏丹诺夫没事的方式对你分手d f n s f s d烦恼什么的风苏丹诺夫收到风女神范是你分手的风少年地方sniffs的粉丝风少年地方的少年模仿收到风呢没事的烦恼时地方苏丹诺夫少年地方模式烦恼时的那么舒服上面等你分手分手风"
);
const fileList = ref<fileListInterface[]>([]);
const onClickBack = () => {
  router.back();
};

const onClickPublish = () => {
  Toast("发布成功");
};
</script>

<style scoped lang="less">
.adopt-publish {
  height: calc(100vh - 52px);
  background-color: #f0f0f0;
  padding-top: 52px;

  &-textarea {
    :deep .van-cell {
      padding: 10px 14px;
    }
    :deep .van-cell-group--inset {
      padding-top: 5px;
      margin: 0;
    }

    :deep .van-cell-group--inset {
      border-radius: 0;
    }

    :deep .van-field {
      background-color: #fff;
    }
  }

  &-upload {
    background-color: #fff;
    padding: 10px 14px;

    :deep .van-uploader__preview {
      margin: 0 12px 12px 0;
    }
  }
}
</style>
